//
//  ArticlePicTableViewCell.m
//  MyProject
//
//  Created by dllo on 15/10/29.
//  Copyright © 2015年 蓝鸥科技. All rights reserved.
//

#import "ArticlePicTableViewCell.h"

#define WIDTH ([UIScreen mainScreen].bounds.size.width/375)
#define HEIGH ([UIScreen mainScreen].bounds.size.height/667)
@implementation ArticlePicTableViewCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.bgImage = [[UIImageView alloc]init];
        [self.contentView addSubview:self.bgImage];
        
        self.describLabel = [[UILabel alloc]init];
        self.describLabel.textColor = [UIColor whiteColor];
        self.describLabel.font = [UIFont systemFontOfSize:20 * WIDTH * HEIGH];
        self.describLabel.numberOfLines = 0;
        [self.describLabel sizeToFit];
        [self.bgImage addSubview:self.describLabel];
        
        self.signatureLabel = [[UILabel alloc]init];
        self.signatureLabel.textColor = [UIColor whiteColor];
        self.signatureLabel.font = [UIFont systemFontOfSize:15 * WIDTH * HEIGH];
        self.signatureLabel.numberOfLines = 0;
        [self.bgImage addSubview:self.signatureLabel];
        
        self.shreImage = [[UIImageView alloc]init];
        [self.bgImage addSubview:self.shreImage];
        
        self.loveImage = [[UIImageView alloc]init];
        [self.bgImage addSubview:self.loveImage];
        
        self.commentImage = [[UIImageView alloc]init];
        [self.bgImage addSubview:self.commentImage];
        
        self.screen_nameLabel = [[UILabel alloc]init];
        self.screen_nameLabel.textColor = [UIColor whiteColor];
        self.screen_nameLabel.font = [UIFont systemFontOfSize:13 * WIDTH * HEIGH];
        [self.bgImage addSubview:self.screen_nameLabel];
        
        
    }
    return self;
}
- (void)layoutSubviews
{
    [super layoutSubviews];
    self.bgImage.frame = CGRectMake(0, 0, self.contentView.bounds.size.width, self.contentView.bounds.size.height);
    self.describLabel.frame = CGRectMake(50 * WIDTH, 50 * HEIGH, self.contentView.bounds.size.width-100 * WIDTH, 180 * HEIGH);
    self.signatureLabel.frame = CGRectMake(130 * WIDTH, 230 * HEIGH, 220 * WIDTH, 20 * HEIGH);
    self.shreImage.frame = CGRectMake(10 * WIDTH, 220 * HEIGH, 30 * WIDTH, 20 * HEIGH);
    self.loveImage.frame = CGRectMake(50 * WIDTH, 220 * HEIGH, 30 * WIDTH, 20 * HEIGH);
    self.commentImage.frame
    = CGRectMake(90 * WIDTH, 220 * HEIGH, 30 * WIDTH, 20 * HEIGH);
    self.screen_nameLabel.frame = CGRectMake(270 * WIDTH, 340 * HEIGH, 100 * WIDTH, 20 * HEIGH);
    
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
